import {defineConfig} from 'vite'
import vue from "@vitejs/plugin-vue";
import {resolve} from "path";
import styleImport, {VantResolve} from 'vite-plugin-style-import';
// https://vitejs.dev/config/
export default defineConfig({
    resolve: {
        alias: {
            "@": resolve(__dirname, "src")
        }
    },
    plugins: [
        vue(),
        styleImport({
            resolves: [VantResolve()],
        })
    ],
    build: {
        terserOptions: {
            compress: {
                //生产环境时移除console
                drop_console: process.env.VITE_DROP_CONSOLE,
                drop_debugger: process.env.VITE_DROP_DEBUGGER
            },
        },
        minify: 'terser'
    }
});
